#pragma once

#include "Object.h"

/**
	* Class for Game Object Platform - Hong Tai
	*
	* Draw platform as a whole
	* Handles how many platform in one line
	* Moves platform
	* Collision detection line - box
*/
class Platform{
public:
	enum PATHTYPE 
	{ 
		GRASS,
		HAY,
		TREE,
		LAMP,
		AISPAWNPOINT,
		BOUNDARY,
		SPECIALSPAWN
	};
	enum COLLISIONTYPE { NOTHING, FLOOR, WALL, CEILING };
private:
	int numOfPlatformWidth, numOfPlatformHeight;
	BoundingLine *wall;
	Object **platform;

	PATHTYPE type;
public:
	Platform(void);
	~Platform(void);

	/**
		* Function to initialize platform
		*
		* @param The starting position of the platform
		* @param Number of platform in 1 line
	*/
	void InitPlatformLength(Vector3D position, int numOfPlatformWidth, int numOfPlatformHeight, PATHTYPE type, float r, float g, float b);
	
	/**
		* Function to draw the platform
	*/
	void DrawPlatform(void);
	
	/**
		* Function to move the platform only if needed
		*
		* @param Direction to move the platform
		* @param Elapsed time for frame independent movement
	*/
	void UpdatePlatform(Vector3D offset, Vector3D direction, float speed, float elapsed);

	/**
		* Function to set position of the platform
	*/
	void SetPosition(Vector3D position);

	Vector3D GetPosition(void);

	/**
		* Function to check for collision for the whole platform
		*
		* @param The bounding box to check collision against
	*/

	Vector3D GetoOff(void);
	COLLISIONTYPE CollisionWithPlatform(BoundingBox &theBox);
};